package cc.linker.steplink.crm.merchant.service.impl;

import cc.linker.steplink.crm.merchant.dao.acs.BindBankDao;
import cc.linker.steplink.crm.merchant.service.acs.BindBankService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class BindBankServiceImpl implements BindBankService {

    @Autowired
    private BindBankDao bindBankDao;

    @Override
    public String findCustomerId(String casUserId) {
        if (StringUtils.isEmpty(casUserId)) {
            return null;
        }
        return bindBankDao.findCustomerId(casUserId);
    }

    @Override
    public String findCorpName(String customerId) {
        if (StringUtils.isEmpty(customerId)) {
            return null;
        }
        return bindBankDao.findCorpName(customerId);
    }

    @Override
    public String findBankID(String bankName) {
        if (StringUtils.isEmpty(bankName)) {
            return null;
        }
        return bindBankDao.findBankId(bankName);
    }

    @Override
    public List<Map<String, String>> returnbanklist(String customerId) {
        return bindBankDao.returnbanklist(customerId);
    }
}
